<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>背景附着(随页面移动)</title>
    <style>
        p{
            color: green;
            font-weight: 700;
        }
        body{
            background-image: url(2.jpg);
            background-position: top;
            /* 背景固定而不随滚轮滚动 */
            background-attachment: fixed;
        }
    </style>
</head>
<body>
    <p>ASASASASASASASAS</p>
    <p>ASASASASASASASAS</p>
    <p>ASASASASASASASAS</p>
    <p>ASASASASASASASAS</p>
    <p>ASASASASASASASAS</p>
    <p>ASASASASASASASAS</p>
    <p>ASASASASASASASAS</p>
    <p>ASASASASASASASAS</p>
    <p>ASASASASASASASAS</p>
    <p>ASASASASASASASAS</p>
    <p>ASASASASASASASAS</p>
    <p>ASASASASASASASAS</p>
    <p>ASASASASASASASAS</p>
    <p>ASASASASASASASAS</p>
    <p>ASASASASASASASAS</p>
    <p>ASASASASASASASAS</p>
    <p>ASASASASASASASAS</p>
    <p>ASASASASASASASAS</p>
    <p>ASASASASASASASAS</p>
    <p>ASASASASASASASAS</p>
    <p>ASASASASASASASAS</p>
    <p>ASASASASASASASAS</p>
    <p>ASASASASASASASAS</p>
    <p>ASASASASASASASAS</p>
    <p>ASASASASASASASAS</p>
    <p>ASASASASASASASAS</p>
    <p>ASASASASASASASAS</p>
    <p>ASASASASASASASAS</p>
    <p>ASASASASASASASAS</p>
    <p>ASASASASASASASAS</p>
    <p>ASASASASASASASAS</p>
    <p>ASASASASASASASAS</p>
    <p>ASASASASASASASAS</p>
    <p>ASASASASASASASAS</p>
    <p>ASASASASASASASAS</p>
    <p>ASASASASASASASAS</p>
    <p>ASASASASASASASAS</p>
    <p>ASASASASASASASAS</p>
    <p>ASASASASASASASAS</p>
    <p>ASASASASASASASAS</p>
    <p>ASASASASASASASAS</p>
    <p>ASASASASASASASAS</p>
    <p>ASASASASASASASAS</p>
    <p>ASASASASASASASAS</p>
    <p>ASASASASASASASAS</p>
</body>
</html>